<?php
class TDataTableContratoSalario extends TDataTable
{ 
    public function __construct($contratoid, $options = array())
    {
        $columns = array();
        $key = 'salarioid';                
        $options['editLink'] = 'cadastrar.php?contratoid='.$contratoid.'&id=';
        $criterio = array();
        $criterio['precondicao']= 'contratoid ='. $contratoid;
        
        parent::__construct(new ViewSalarios(), $key, $criterio, $options, $columns);
        $this->addColumnsData(
                array('cargo',
                        array('header'=> 'salario base', 'name' => 'salario base', 'mask'=>TDataTableColumn::MASK_MONEY), 
                        array('header'=> 'valor unitario', 'name' => 'valor unitario', 'mask'=>TDataTableColumn::MASK_MONEY),
                        'iniciovigencia',
                        'fimvigencia')
        );
    }    
}